<%@ Page Language="VB" MasterPageFile="~/ZayedHouse.master" AutoEventWireup="false"
    CodeFile="OutputVoucher.aspx.vb" Inherits="Processes_Storing_OutputVoucher" Title="Untitled Page" %>

<%@ Register Src="../../../UserControl/OneFilteredDropDownList.ascx" TagName="OneFilteredDropDownList"
    TagPrefix="uc2" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register TagPrefix="sds" Namespace="Telerik.Web.SessionDS" %>
<%@ Register Src="../../../UserControl/DDL.ascx" TagName="WebUserControl" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CPH1" runat="Server">
    <table style="table-layout: fixed;">
        <tr>
            <td style="width: 50px">
                <asp:Label ID="lblEnterDate" runat="server" meta:resourceKey="lblDate"></asp:Label></td>
            <td>
                <telerik:RadDateInput ID="rdiDate" runat="server" Enabled="False" ReadOnly="True"
                    SkinID="EnterDate" TabIndex="-1">
                </telerik:RadDateInput></td>
            <td>
                <asp:Label ID="lblOutputVoucherID" runat="server" meta:resourceKey="lblID"></asp:Label></td>
            <td>
                <telerik:RadTextBox ID="rtxtOutputVoucherID" runat="server" SkinID="Text" Enabled="False">
                </telerik:RadTextBox></td>
            <td>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblMaterialRequestID" runat="server" meta:resourceKey="lblMaterialRequestID"></asp:Label></td>
            <td>
                <telerik:RadNumericTextBox ID="rtxtMaterialRequestID" SkinID="Number" runat="server"
                    Enabled="False">
                </telerik:RadNumericTextBox></td>
            <td>
                <asp:Label ID="lblMaterialRequestYear" runat="server" meta:resourceKey="lblMaterialRequestYear"></asp:Label></td>
            <td>
                <telerik:RadDateInput ID="rntxtMaterialRequestYear" runat="server" SkinID="EnterDate"
                    Enabled="False">
                </telerik:RadDateInput></td>
            <td>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblCostCenter" meta:resourceKey="lblCostCenter" runat="server"></asp:Label></td>
            <td>
                <uc2:OneFilteredDropDownList ID="fddlCostCenter" runat="server" DataSourceId="ODSRetrieveCostCenter"
                    DataTextField="<%$ Resources:MainGrid ,FDDLCostCenter %>" DataValueField="CostCenterNo"
                    DefaultChoosedItem="ChooseOne" IsRequired="true" />
                <asp:ObjectDataSource ID="ODSRetrieveCostCenter" runat="server" SelectMethod="QueryDatabase"
                    TypeName="CL_ORM.DBWFRetrieveSP">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="1" Name="QueryType" Type="Object" />
                        <asp:Parameter DefaultValue="RetrieveAllCostCenter" Name="Operation" Type="String" />
                        <asp:Parameter Name="CostCenterNo" Type="String" />
                        <asp:Parameter Name="ProgramNO" Type="String" />
                        <asp:Parameter Name="ProjectNO" Type="String" />
                        <asp:Parameter Name="lEVEL" Type="String" />
                        <asp:Parameter Name="ItemNo" Type="String" />
                        <asp:Parameter Name="FParmeter" Type="String" />
                        <asp:Parameter Name="SParmeter" Type="String" />
                        <asp:Parameter Name="TParmeter" Type="String" />
                    </SelectParameters>
                </asp:ObjectDataSource>
            </td>
            <td>
                <asp:Label ID="lblMainCostCenter" meta:resourceKey="lblMainCostCenter" runat="server"></asp:Label></td>
            <td>
                <telerik:RadTextBox ID="rtxtRootCostCenter" runat="server" SkinID="Text" Enabled="False"
                    TabIndex="-1">
                </telerik:RadTextBox></td>
            <td>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblWarehouse" runat="server" meta:resourceKey="lblWarehouse"></asp:Label></td>
            <td>
                <uc2:OneFilteredDropDownList ID="fddlStore" runat="server" DataSourceId="ODSStore"
                    DataTextField="StoreDesc" DataValueField="StoreNo" DefaultChoosedItem="ChooseOne"
                    IsRequired="True" />
            </td>
            <td>
                <asp:Label ID="lblWarehouseman" runat="server" meta:resourceKey="lblWarehouseman"></asp:Label>&nbsp;</td>
            <td>
                <telerik:RadTextBox ID="rtxtWarehouseman" runat="server" Enabled="False" SkinID="Text"
                    TabIndex="-1">
                </telerik:RadTextBox></td>
            <td>
            </td>
        </tr>
        <tr>
            <td colspan="5">
                <telerik:RadGrid ID="rgMat" runat="server" GridLines="None" DataSourceID="SessionDataSource1"
                    AllowAutomaticDeletes="True" AllowAutomaticInserts="True" Width="97%" AllowAutomaticUpdates="True"
                    AutoGenerateColumns="False" Skin="WebBlue" MasterTableView-Dir="<%$ Resources:SystemResource, HTMLDirectionality %>"
                    GroupPanel-Text="<%$ Resources:Grid ,GroupPanelText %>">
                    <MasterTableView Width="100%"  DataKeyNames="IDNO"
                        TableLayout="Fixed" DataSourceID="SessionDataSource1" HorizontalAlign="NotSet"
                        NoMasterRecordsText="<%$ Resources:Grid , NoMasterRecordsText %>">
                        <CommandItemTemplate>
                            <img style="border: 0px; vertical-align: middle;" alt="" src="../../../images/Grid/AddRecord.gif" />&nbsp;&nbsp;<asp:LinkButton
                                ID="LinkButton2" runat="server" Font-Size="Large" Text="<%$ Resources:Grid , AddNew %>"
                                CommandName="InitInsert" Visible="true" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <img style="border: 0px; vertical-align: middle;" alt="" src="../../../images/Grid/Edit.gif" />&nbsp;&nbsp;
                            <asp:LinkButton ID="btnEditSelected" runat="server" Font-Size="Large" Text="<%$ Resources:Grid , EditSelected %>"
                                CommandName="EditSelected" Visible="true" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <img style="border: 0px; vertical-align: middle;" alt="" src="../../../images/Grid/Delete.gif" />&nbsp;&nbsp;<asp:LinkButton
                                ID="LinkButton1" Font-Size="Large" OnClientClick="<%$ Resources:MainGrid , OnClientClickDelete %>"
                                runat="server" Text="<%$ Resources:Grid , DeleteSelected %>" CommandName="DeleteSelected" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <img style="border: 0px; vertical-align: middle;" alt="" src="../../../images/Grid/Refresh.gif" />&nbsp;&nbsp;<asp:LinkButton
                                ID="LinkButton4" Font-Size="Large" runat="server" Text="<%$ Resources:Grid , Refresh %>"
                                CommandName="RebindGrid" />
                        </CommandItemTemplate>
                        <Columns>
                            <telerik:GridEditCommandColumn ButtonType="ImageButton"  Visible ="False" >
                                <ItemStyle CssClass="MyImageButton" />
                                <HeaderStyle Width="50px" />
                            </telerik:GridEditCommandColumn>
                            <telerik:GridBoundColumn DataField="IDNO" HeaderText="IDNO" ReadOnly="True" SortExpression="IDNO"
                                UniqueName="IDNO" Visible="False">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="FIDNO" HeaderText="FIDNO" ReadOnly="True" SortExpression="IDNO"
                                UniqueName="FIDNO" Visible="False">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="TransYear" HeaderText="TransYear" ReadOnly="True"
                                SortExpression="TransYear" UniqueName="TransYear" Visible="False">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="OrderNo" HeaderText="OrderNo" ReadOnly="True"
                                SortExpression="OrderNo" UniqueName="OrderNo" Visible="False">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ItemNo" HeaderText="<%$ Resources:MainGrid , ItemNo %>"
                                SortExpression="ItemNo" UniqueName="ItemNo">
                                <HeaderStyle Width="50px" />
                                <ItemStyle Width="50px" />
                            </telerik:GridBoundColumn>
                            <telerik:GridDropDownColumn DataField="ItemNo" DataSourceID="ODSItem" HeaderText="<%$ Resources:MainGrid , Item %>"
                                ListTextField="ItemName" ListValueField="ItemNo" UniqueName="ItemNo" EnableEmptyListItem="True">
                                <HeaderStyle Width="100px" />
                                <ItemStyle Width="100px" />
                            </telerik:GridDropDownColumn>
                            <telerik:GridBoundColumn DataField="ItemDesc" HeaderText="<%$ Resources:MainGrid , ItemDesc %>"
                                SortExpression="ItemDesc" UniqueName="ItemDesc">
                                <HeaderStyle Width="100px" />
                                <ItemStyle Width="100px" />
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="UnitNo" HeaderText="<%$ Resources:MainGrid , UnitNo %>"
                                SortExpression="UnitNo" UniqueName="UnitNo" Visible="False">
                                <HeaderStyle Width="50px" />
                                <ItemStyle Width="50px" />
                            </telerik:GridBoundColumn>
                            <telerik:GridDropDownColumn DataField="UnitNo" DataSourceID="ODSUnit" HeaderText="<%$ Resources:MainGrid , Unit %>"
                                ListTextField="UnitDesc" ListValueField="UnitNo" UniqueName="UnitNo" EnableEmptyListItem="True">
                                <HeaderStyle Width="50px" />
                                <ItemStyle Width="50px" />
                            </telerik:GridDropDownColumn>
                            <telerik:GridTemplateColumn HeaderText="<%$ Resources:MainGrid , Asset %>" SortExpression="AssetNo"
                                UniqueName="AssetNo">
                                <HeaderStyle Width="150px" />
                                <ItemStyle Width="150px" />
                                <ItemTemplate>
                                    <telerik:RadTextBox SkinID="Text" ID="rtxtAssetNo" runat="server" Text='<%# Eval("AssetNo") %>' >
                                    </telerik:RadTextBox>
                                </ItemTemplate>
                                <EditItemTemplate>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="<%$ Resources:MainGrid , ExpireDate %>" SortExpression="ExpireDate"
                                UniqueName="ExpireDate">
                                <HeaderStyle Width="170px" />
                                <ItemStyle Width="170px" />
                                <ItemTemplate>
                                    <telerik:RadDatePicker SkinID="Date" Skin="WebBlue" ID="rdpExpireDate" runat="server"
                                        Text='<%# Eval("ExpireDate") %>'>
                                    </telerik:RadDatePicker>
                                </ItemTemplate>
                                <EditItemTemplate>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridNumericColumn DataField="Qty" meta:resourceKey="Qty" DataFormatString="{0:###,###}"
                                HeaderText="Qty" SortExpression="Qty" UniqueName="Qty" EditFormColumnIndex="1"
                                NumericType="Number">
                                <HeaderStyle Width="80px" />
                                <ItemStyle Width="80px" />
                            </telerik:GridNumericColumn>
                            <telerik:GridNumericColumn DataField="AmountDisburse" meta:resourceKey="AmountDisburse"
                                DataFormatString="{0:###,###}" HeaderText="AmountDisburse" SortExpression="AmountDisburse"
                                UniqueName="AmountDisburse" EditFormColumnIndex="1" NumericType="Number">
                                <HeaderStyle Width="80px" />
                                <ItemStyle Width="80px" />
                            </telerik:GridNumericColumn>
                            <telerik:GridCalculatedColumn DataFields="Qty,AmountDisburse" Expression="{0}-{1}"
                                Aggregate="Sum" meta:resourceKey="AmountRemains" UniqueName="AmountRemainsCalc"
                                DataFormatString="{0:###,###}" DataType="System.Double">
                                <HeaderStyle Width="80px" />
                                <ItemStyle Width="80px" />
                            </telerik:GridCalculatedColumn>
                            <telerik:GridCheckBoxColumn DataField="IsComplete" meta:resourceKey="IsComplete"
                                UniqueName="IsComplete" DataType="System.Boolean">
                                <HeaderStyle Width="80px" />
                                <ItemStyle Width="80px" />
                            </telerik:GridCheckBoxColumn>
                            
                       <telerik:GridTemplateColumn HeaderText="<%$ Resources:MainGrid , ReceivedQty %>" SortExpression="ReceivedQty"
                                UniqueName="ReceivedQty">
                                <HeaderStyle Width="170px" />
                                <ItemStyle Width="170px" />
                                <ItemTemplate>
                                    <telerik:RadNumericTextBox SkinID="Number" Skin="WebBlue" ID="rtxtReceivedQty" runat="server" AutoPostBack ="true"  OnTextChanged="rtxtReceivedQty_TextChanged" Culture="English (United States)" DbValue='<%# Eval("ReceivedQty") %>' LabelCssClass="radLabelCss_WebBlue" Width="125px">
                                    </telerik:RadNumericTextBox>
                                </ItemTemplate>
                                <EditItemTemplate>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            
                            
                            <telerik:GridBoundColumn DataField="Note" HeaderText="<%$ Resources:MainGrid , Note %>"
                                UniqueName="Note">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </telerik:GridBoundColumn>
                            <telerik:GridButtonColumn ConfirmText="<%$ Resources:MainGrid , ConfirmDelete %>"
                                ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton"
                                CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" Visible ="False" >
                                <HeaderStyle Width="20px" />
                                <ItemStyle Width="50px" HorizontalAlign="Center" CssClass="MyImageButton" />
                            </telerik:GridButtonColumn>
                        </Columns>
                        <EditFormSettings>
                            <FormTemplate>
                           
                            </FormTemplate>
                            <EditColumn UniqueName="EditCommandColumn1">
                            </EditColumn>
                        </EditFormSettings>
                        <RowIndicatorColumn>
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn>
                            <HeaderStyle Width="20px" />
                        </ExpandCollapseColumn>
                        <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" HorizontalAlign="Center" Wrap="True" />
                    </MasterTableView>
                    <ClientSettings AllowDragToGroup="True">
                        <Scrolling AllowScroll="True" />
                        <Selecting AllowRowSelect="True" />
                    </ClientSettings>
                    <FilterMenu EnableTheming="True" Skin="WebBlue">
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </FilterMenu>
                </telerik:RadGrid>
                <sds:SessionDataSource ID="SessionDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnStrAccounting %>"
                    SelectCommand="EXEC WFDeliveryNoteDtl @Operation,null , @TransYear,@DeliveryNoteNO , @OrderNo , @OrderYear"
                    DeleteCommand="DELETE FROM [OrderItemDtl] WHERE [IDNO] = ?" InsertCommand="INSERT INTO OrderItemDtl(TransYear, OrderNo,ProgNO, ProjectNO,ItemNo,ItemDesc, UnitNo, Qty, AmountDisburse,AmountRemains,IsComplete,AvalAmount,AmountPurchase,ReceivedQty,Note) VALUES ( @TransYear,@OrderNo,?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?)"
                    UpdateCommand="UPDATE [OrderItemDtl] SET [TransYear] = @TransYear, [OrderNo] = @OrderNo,[ProgNO] = ?, [ProjectNO] = ?, [ItemNo] = ?,[ItemDesc] = ?, [UnitNo] = ?, [Qty] = ?, [AmountDisburse] = ?, [AmountRemains] = ?, [IsComplete] = ?, [AvalAmount] = ?, [ReceivedQty] = ? WHERE [TransYear] =  @TransYear And [OrderNo] = @OrderNo And [IDNO] = ? AND  [ProgNO] = ? And [ProjectNO] = ? And [ItemNo] = ? And [ItemDesc] = ?  And [UnitNo] = ? And [Qty] = ? And [AmountDisburse] = ? And [AmountRemains] = ? And [IsComplete] = ? And [AvalAmount] = ?"
                    PrimaryKeyFields="IDNO" OldValuesParameterFormatString="original_{0}" ConflictDetection="CompareAllValues"
                    ClearSessionOnInitialLoad="True" SessionKey="System.Web.UI.Page_SessionDataSource1">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="hdnYear" Name="TransYear" PropertyName="Value"
                            Type="String" />
                          <asp:ControlParameter ControlID="hdnID" Name="DeliveryNoteNO" PropertyName="Value"
                            Type="String" />
                        <asp:ControlParameter ControlID="hdnMaterialRequestID" Name="OrderNo" PropertyName="Value"
                            Type="String" />
                             <asp:ControlParameter ControlID="hdnMaterialRequestYear" Name="OrderYear" PropertyName="Value"
                            Type="String" />
                        <asp:Parameter Name="Operation" Type="String" DefaultValue="RtvDeliveryNoteDtl" />
                    </SelectParameters>
                    <UpdateParameters>
                        <asp:ControlParameter ControlID="hdnYear" Name="TransYear" PropertyName="Value" Type="String" />
                        <asp:ControlParameter ControlID="hdnID" Name="OrderNo" PropertyName="Value" Type="String" />
                    </UpdateParameters>
                    <InsertParameters>
                        <asp:ControlParameter ControlID="hdnYear" Name="TransYear" PropertyName="Value" Type="String" />
                        <asp:ControlParameter ControlID="hdnID" Name="OrderNo" PropertyName="Value" Type="String" />
                    </InsertParameters>
                </sds:SessionDataSource>
                <asp:ObjectDataSource ID="ODSUnit" runat="server" SelectMethod="QueryDatabase" TypeName="CL_ORM.DBWFRetrieveSP">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="1" Name="QueryType" Type="Object" />
                        <asp:Parameter DefaultValue="RetrieveAllUnits" Name="Operation" Type="String" />
                        <asp:Parameter Name="CostCenterNo" Type="String" />
                        <asp:Parameter Name="ProgramNO" Type="String" />
                        <asp:Parameter Name="ProjectNO" Type="String" />
                        <asp:Parameter Name="lEVEL" Type="String" />
                        <asp:Parameter Name="ItemNo" Type="String" />
                        <asp:Parameter Name="FParmeter" Type="String" />
                        <asp:Parameter Name="SParmeter" Type="String" />
                        <asp:Parameter Name="TParmeter" Type="String" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                <asp:ObjectDataSource ID="ODSItem" runat="server" SelectMethod="QueryDatabase" TypeName="CL_ORM.DBWFRetrieveSP">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="1" Name="QueryType" Type="Object" />
                        <asp:Parameter DefaultValue="RetrieveItem" Name="Operation" Type="String" />
                        <asp:Parameter Name="CostCenterNo" Type="String" />
                        <asp:Parameter Name="ProgramNO" Type="String" />
                        <asp:Parameter Name="ProjectNO" Type="String" />
                        <asp:Parameter Name="lEVEL" Type="String" />
                        <asp:Parameter Name="ItemNo" Type="String" />
                        <asp:Parameter Name="FParmeter" Type="String" />
                        <asp:Parameter Name="SParmeter" Type="String" />
                        <asp:Parameter Name="TParmeter" Type="String" />
                    </SelectParameters>
                </asp:ObjectDataSource>
            </td>
        </tr>
        <tr>
            <td colspan="5">
                <asp:RadioButtonList ID="rblActions" runat="server" DataSourceID="DSActions" DataTextField="DescriptionAR"
                    DataValueField="ActionId" meta:resourcekey="rblActions">
                </asp:RadioButtonList><asp:ObjectDataSource ID="DSActions" runat="server" OldValuesParameterFormatString="original_{0}"
                    SelectMethod="QueryDatabase" TypeName="CL_ORM.DB_Process_Process_ActionsSP">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="1" Name="QueryType" Type="Object" />
                        <asp:Parameter DefaultValue="ProcessAction" Name="Operation" Type="String" />
                        <asp:Parameter DefaultValue="MaterialRequest" Name="Scr_Code" Type="String" />
                        <asp:Parameter DefaultValue="" Name="ActionId" Type="String" />
                        <asp:ControlParameter ControlID="hdnStepParam" Name="Process_Number" PropertyName="Value"
                            Type="String" />
                    </SelectParameters>
                </asp:ObjectDataSource>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblNote" runat="server" Font-Bold="False" Text="<%$ Resources:NotesGrid, Notes %>"
                    SkinID="key"></asp:Label></td>
            <td colspan="4">
                <telerik:RadTextBox ID="rtxtNotes" runat="server" Height="70px" Skin="WebBlue" TextMode="MultiLine"
                    Width="500px" SkinID="Text">
                </telerik:RadTextBox></td>
        </tr>
        <tr>
            <td>
            </td>
            <td colspan="4">
                <telerik:RadGrid ID="rgNotes" runat="server" AllowPaging="FALSE" AutoGenerateColumns="False"
                    GridLines="None" MasterTableView-Dir="<%$ Resources:SystemResource, HTMLDirectionality %>"
                    Skin="WebBlue" SortingSettings-SortToolTip="<%$ Resources:Grid ,SortToolTip %>"
                    DataSourceID="ODSNotes">
                    <MasterTableView DataKeyNames="NoteID" NoMasterRecordsText="<%$ Resources:Grid , NoMasterRecordsText %>"
                        TableLayout="Fixed" DataSourceID="ODSNotes">
                        <RowIndicatorColumn>
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn>
                            <HeaderStyle Width="20px" />
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridBoundColumn DataField="UserName" HeaderText="<%$ Resources:NotesGrid, UserName %>"
                                UniqueName="UserName">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Managment" HeaderText="<%$ Resources:NotesGrid, Management %>"
                                UniqueName="Management">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Note" HeaderText="<%$ Resources:NotesGrid, Notes %>"
                                UniqueName="Notes">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ActionDescAr" HeaderText="<%$ Resources:NotesGrid, ActionDescription %>"
                                UniqueName="ActionDescription">
                            </telerik:GridBoundColumn>
                            <telerik:GridDateTimeColumn DataField="NoteDate" DataFormatString="{0:dd/MM/yy}"
                                HeaderText="<%$ Resources:NotesGrid, NoteDate %>" UniqueName="NoteDate">
                            </telerik:GridDateTimeColumn>
                            <telerik:GridDateTimeColumn DataField="NoteDate" DataFormatString="{0:hh:mm}" HeaderText="<%$ Resources:NotesGrid, NoteTime %>"
                                UniqueName="NoteTime">
                            </telerik:GridDateTimeColumn>
                        </Columns>
                        <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" Wrap="True" />
                        <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" Wrap="True" HorizontalAlign="Center" />
                    </MasterTableView>
                    <ClientSettings>
                        <Selecting AllowRowSelect="True" />
                        <Scrolling ScrollHeight="" UseStaticHeaders="True" />
                    </ClientSettings>
                    <FilterMenu EnableAjaxSkinRendering="False" EnableEmbeddedBaseStylesheet="False"
                        EnableEmbeddedSkins="False" EnableTheming="True" Skin="Red">
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </FilterMenu>
                    <SortingSettings SortToolTip="Click here to Sort" />
                </telerik:RadGrid>
            </td>
        </tr>
        <tr>
            <td align="center" colspan="5">
                <table >
                    <tr>
                        <td>
                <asp:ImageButton ID="btnBack" runat="server" ImageUrl="<%$ Resources:Controls, btnBack %>"
                    ToolTip="Back" Visible="False" /></td>
                        <td >
                            <asp:ImageButton ID="btnPrint" runat="server" ImageUrl="<%$ Resources:Controls, btnPrint %>"
                        ToolTip="Print" CausesValidation="False" /></td>
                        <td >
                            <asp:ImageButton ID="btnSend" runat="server" ImageUrl="<%$ Resources:controls, btnSend %>"
                            ToolTip="Send"    /></td>
                        <td >
                            <asp:ImageButton ID="btnSave" runat="server" ImageUrl="<%$ Resources:controls, btnSave %>"
                            ToolTip="Save" Visible ="false"  /></td>
                    </tr>
                </table>
     
                            </td>
        </tr>
        <tr>
            <td colspan="3">
                <asp:ObjectDataSource ID="ODSNotes" runat="server" OldValuesParameterFormatString="original_{0}"
                    SelectMethod="QueryDatabase" TypeName="CL_ORM.DB_Process_NotesSP">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="1" Name="QueryType" Type="Object" />
                        <asp:Parameter DefaultValue="RetrieveAllNotes" Name="Operation" Type="String" />
                        <asp:ControlParameter ControlID="hdnID" DefaultValue="" Name="ID" PropertyName="Value"
                            Type="String" />
                        <asp:Parameter Name="NoteDate" Type="String" />
                        <asp:Parameter Name="NoteTime" Type="String" />
                        <asp:Parameter DefaultValue="" Name="NoteID" Type="String" />
                        <asp:Parameter DefaultValue="OutputVoucher" Name="Scr_Code" Type="String" />
                        <asp:Parameter Name="UserName" Type="String" />
                        <asp:Parameter Name="Managment" Type="String" />
                        <asp:Parameter Name="Note" Type="String" />
                        <asp:Parameter Name="ActionId" Type="String" />
                        <asp:ControlParameter ControlID="hdnYear" DefaultValue="" Name="Year" PropertyName="Value"
                            Type="String" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                    <AjaxSettings>
                        <telerik:AjaxSetting AjaxControlID="rgMat">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="rgMat" />
                                <telerik:AjaxUpdatedControl ControlID="btnSend" />
                                <telerik:AjaxUpdatedControl ControlID="btnSave" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                    </AjaxSettings>
                </telerik:RadAjaxManager>
                <asp:ObjectDataSource ID="ODSStore" runat="server" SelectMethod="QueryDatabase" TypeName="CL_ORM.DBWFRetrieveSP">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="1" Name="QueryType" Type="Object" />
                        <asp:Parameter DefaultValue="RetrieveStore" Name="Operation" Type="String" />
                        <asp:Parameter Name="CostCenterNo" Type="String" />
                        <asp:Parameter Name="ProgramNO" Type="String" />
                        <asp:Parameter Name="ProjectNO" Type="String" />
                        <asp:Parameter Name="lEVEL" Type="String" />
                        <asp:Parameter Name="ItemNo" Type="String" />
                        <asp:Parameter Name="FParmeter" Type="String" />
                        <asp:Parameter Name="SParmeter" Type="String" />
                        <asp:Parameter Name="TParmeter" Type="String" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                
                
            </td>
            <td colspan="2">
                <asp:HiddenField ID="hdnID" runat="server" />
                <asp:HiddenField ID="hdnYear" runat="server" />
                <asp:HiddenField ID="hdnStepParam" runat="server" />
                <asp:HiddenField ID="hdnUserID" runat="server" />
                <asp:HiddenField ID="hdnUserName" runat="server" />
                <asp:HiddenField ID="hdnEmp_No" runat="server" />
                <asp:HiddenField ID="hdnDep" runat="server" />
                <asp:HiddenField ID="hdnMang" runat="server" />
                <asp:HiddenField ID="hdnSec" runat="server" />
                <asp:HiddenField ID="hdnDepNo" runat="server" />
                <asp:HiddenField ID="hdnMangNo" runat="server" />
                <asp:HiddenField ID="hdnSecNo" runat="server" />
                   <asp:HiddenField ID="hdnAssetNo" runat="server" />
                   <asp:HiddenField ID="hdnItemNo" runat="server" />
                <asp:HiddenField ID="hdnMaterialRequestID" runat="server" />
                <asp:HiddenField ID="hdnMaterialRequestYear" runat="server" />
                <asp:HiddenField ID="hdnCostCenterNo" runat="server" />
            </td>
        </tr>
    </table>
</asp:Content>
